﻿

namespace LS.Nc6.Application.System
{
    /// <summary>
    /// 消息自己的方法
    /// </summary>
   public interface ISysNoticeService : IBaseInterface<SysNoticeEntity>
    {
        /// <summary>
        /// 根据条件返回数据
        /// </summary>
        /// <returns></returns>
        DataTable GetUnNotifyNum(string where);

        /// <summary>
        /// 设置消息为已读
        /// </summary>
        /// <param name="ids">消息ids</param>
        /// <param name="userId">用户id</param>
        /// <returns></returns>
        Task<int> SetNoticeToReads(string ids, long userId);

        /// <summary>
        /// 插入通知消息
        /// </summary>
        /// <param name="notice"></param>
        /// <param name="noticeUserList"></param>
        /// <returns></returns>
        Task<int> InsertNotice(SysNoticeEntity notice,List<SysNoticeUserEntity> noticeUserList);

        /// <summary>
        /// 修改通知消息
        /// </summary>
        /// <param name="notice"></param>
        /// <param name="noticeUserList"></param>
        /// <returns></returns>
        Task<int> UpdateNotice(SysNoticeEntity notice, List<SysNoticeUserEntity> noticeUserList);

        /// <summary>
        /// 获取通知公告
        /// </summary>
        /// <param name="expression"></param>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <param name="expressionOrder"></param>
        /// <returns></returns>
        Task<SqlSugarPagedList<SysNoticeEntity>> PageNoticeList(Expression<Func<SysNoticeEntity, SysNoticeUserEntity, bool>> expression, int page, int limit, Expression<Func<SysNoticeEntity, SysNoticeUserEntity, object>> expressionOrder);

        /// <summary>
        /// 获取通知公告List TOP
        /// </summary>
        /// <param name="expression"></param>
        /// <param name="limit"></param>
        /// <param name="expressionOrder"></param>
        /// <param name="expressionSelect"></param>
        /// <returns></returns>
        Task<List<dynamic>> NoticeList(Expression<Func<SysNoticeEntity, SysNoticeUserEntity, bool>> expression, int limit,
            Expression<Func<SysNoticeEntity, SysNoticeUserEntity, object>> expressionOrder, Expression<Func<SysNoticeEntity, SysNoticeUserEntity, dynamic>> expressionSelect);


    }
}
